package com.kly.smartbi.test.day02;

import java.util.Scanner;

/**
 * @author admin
 * @date 2025/4/2
 */
public class Demo1 {

    public static void main(String[] args) {
        getPassRate();
    }


    /**
     * 出现最多次数字符
     */
    public static void getMaxOccurChar() {
        Scanner scan = new Scanner(System.in);
        //在此输入您的代码...
        String word = scan.next();
        int[] records = new int[26];
        for(int i = 0; i < word.length(); i++) {
            records[word.charAt(i) - 'a']++;
        }
        // 找出最大的字符数
        int max = 0;
        int index = 0;
        for(int i = 0; i < 26; i++) {
            if(max < records[i]) {
                max = records[i];
                index = i;
            }
        }
        System.out.println((char)(index + 'a'));
        System.out.println(max);
        scan.close();
    }

    /**
     * 统计及格率， 优秀率
     */
    public static void getPassRate() {
        Scanner scan = new Scanner(System.in);
        //在此输入您的代码...
        int n = scan.nextInt();
        int num1 = 0;
        int num2 = 0;
        for(int i = 0; i < n; i++) {
            int score = scan.nextInt();
            if(score >= 60) num1++;
            if(score >= 85) num2++;
        }
        long a = Math.round(num1 * 100.0 / n);
        long b = Math.round(num2 * 100.0 / n);
        System.out.println(a + "%");
        System.out.println(b + "%");

        scan.close();
    }
}
